import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'


const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    redirect: '/bigDep',
    children:[
      {path: '/bigDep', component: () => import('../views/work/bigDepView.vue')},
      {path: '/schedules', component: () => import('../views/work/schedulesView.vue')},
      {path: '/application', component: () => import('../views/work/applicationView.vue')},
      {path: '/doctor', component: () => import('../views/appointment/doctorView.vue')},
      {path: '/registration', component: () => import('../views/appointment/registrationView.vue')},
      {path: '/staff', component: () => import('../views/accounts/staffView.vue')},
      {path: '/user', component: () => import('../views/accounts/userView.vue')},
      {path: '/agreement', component: () => import('../views/hospital/AgreementView.vue')},
      {path: '/introduce', component: () => import('../views/hospital/IntroduceView.vue')},
      ]
  },
  {path: '/login', component: () => import('../views/loginView.vue')}
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router